﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page import="java.util.*"%>

<%@ page import="com.element5th.comm.DateUtil;"%>
<!DOCTYPE html PUBLIC "-//W3C//Dtd HTML 4.01 transitional//EN" "http://www.w3.org/tr/html4/loose.dtd">
<html>
<head>
<base href="<%=request.getContextPath()%>/">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>订单列表</title>
<link rel="stylesheet" href="css/orderlist.css" type="text/css"
	media="all" />
	<script type="text/javascript" src="js/shoporder.js"></script>
</head>

<body>
<form id="form" name="form" method="post" action="orderlist"><!-- 1.工具栏-->
<div id="toolbar" class="base_div">
<div id="div_1"><!-- 欢迎语-->
<div id="d1_welcom"><span>欢迎来第五元素购物商城!</span></div>
<!-- 功能按钮-->
<div id="d1_login">
<ul>
	<li><a href="">[登录]</a></li>
	<li><img src="images/welcom_1.gif" alt="" /></li>
	<li><a href="">[免费注册]</a></li>
	<li><img src="images/welcom_1.gif" alt="" /></li>
	<li><a href="">我的订单</a></li>
	<li><img src="images/welcom_1.gif" alt="" /></li>
	<li><a href="">购物车0件</a></li>
</ul>
</div>

</div>

</div>

<!-- 2.图片 -->
<div id="div_2" class="base_div"><img src="images/img.gif" alt="" />
</div>

<!--3. logo-->
<div id="div_3" class="base_div">
<div id="d3_logo"><img src="images/logo.jpg" alt="" /></div>

<div id="d3_find">
<ul id="d3_ul1">
	<li><input type="text" name="输入" /></li>
	<li><a href="">搜索</a></li>
</ul>
<ul id="d3_ul2">
	<li><a href="">电脑数码</a></li>
	<li><a href="">家电通讯</a></li>
	<li><a href="">佳人名仕</a></li>
	<li><a href="">食品母婴</a></li>
	<li><a href="">生活专区</a></li>
	<li><a href="">图书音像</a></li>

</ul>
</div>

</div>

<!--4.导航-->
<div id="div_4" class="base_div">
<div id="d4_type">商品分类</div>
<div id="d4_ng">
<ul>
	<li><a href="">首页</a></li>
	<li><a href="">论坛</a></li>
	<li><a href="">留言板</a></li>
	<li><a href="">团购</a></li>
	<li><a href="">在线游戏</a></li>
</ul>
</div>
</div>

<div id="orderlist_top" class="base_div"><strong>个人中心</strong> <span>
我的订单</span></div>

<div id="orderlist_serch" class="base_div"><select id="order_time">
	<option value="1">近一个月的订单</option>
	<option value="2">以前的订单</option>
</select> <select id="order_state">
	<option value="1">全部订单</option>
	<option value="2">未完成订单</option>
	<option value="3">未付款订单</option>
	<option value="4">未发货订单</option>
	<option value="5">已取消订单</option>
</select> <input type="button" value="查询" onclick="shoporder_scerch()" /></div>

<div id="orderlist_table" class="base_div">
<table cellpadding="0" cellspacing="0" width="100%">
	<tbody>
		<!-- 表头 -->
		<tr>
			<th width="12%">订单编号</th>
			<th width="28%">订单商品</th>
			<th width="10%">收货人</th>
			<th width="12%">订单金额</th>
			<th width="12%">下单时间</th>
			<th width="12%">订单状态</th>
			<th width="14%">操作</th>
		</tr>

		<c:forEach items="${orderlist}" var="dto">

			<tr class="orderlist_td">

				<td><a href="/ShopSytem/page/user/orderd.jsp"
					target="view_window" name="orderIdLinks">${dto.shopOrder.orderId}</a></td>

				<td align="left">
				<div class="img-list"><a><img src="images/product_1.jpg"
					title="商品1" /></a></div>
				</td>
				<td>${dto.user.userName}</td>
				<td>${dto.shopOrder.orderSumfee}<br />
				${dto.orderPayType.paytypeName}</td>
				<td><span>${dto.shopOrder.strorderSubDate }<br />
				${dto.shopOrder.strorderSubTime } </span></td>
				<td><span> <c:choose>
					<c:when test="${dto.shopOrder.orderIscanel==1} ">
							已取消
						</c:when>
					<c:otherwise>
						<c:choose>
							<c:when
								test="${(dto.shopOrder.paytypeId != 1)&&(empty dto.shopOrder.orderPaytime) }">
								等待付款
								</c:when>
							<c:otherwise>
								<c:choose>
									<c:when test="${(empty dto.shopOrder.orderSendtime) }">
									即将发货
									</c:when>
									<c:otherwise>

										<c:choose>
											<c:when test="${(empty dto.shopOrder.orderFinishtime) }">
									已经发货
									</c:when>
											<c:otherwise>
									订单完成
									</c:otherwise>
										</c:choose>
									</c:otherwise>
								</c:choose>
							</c:otherwise>
						</c:choose>
					</c:otherwise>
				</c:choose></span></td>
				<td id="Td1"><a href="#">查看</a> <a href="#"> <c:choose>
					<c:when
						test="${(dto.shopOrder.orderIscanel==0)&&(empty dto.shopOrder.orderSendtime)}">
						|取消
					</c:when>
					<c:when
						test="${(!empty dto.shopOrder.orderFinishtime)}">
						|评论
					</c:when>
				</c:choose> </a><br />
				<a href="#">还要买</a></td>
			</tr>
		</c:forEach>
		<tr>
			<td colspan="7" class="">
			<div class="">等待付款订单数：<strong>0</strong>&nbsp;&nbsp; 未完成的订单数：<strong>0</strong>&nbsp;&nbsp;
			已完成的订单数：<strong>8</strong>&nbsp;&nbsp; 已取消订单数：<strong>1</strong>&nbsp;&nbsp;
			订单总数：<strong>9</strong>&nbsp;&nbsp;</div>
			</td>
		</tr>
	</tbody>
</table>
</div>

<div id="div_footer" class="base_div"></div>
</form>
</body>

</html>
